<template>
  <a-button :type="type" @click="$emit('click')" :disabled="disabled"> {{ s_value }} </a-button>
</template>

<script>

export default {
    name: 'CustomButton',
    data() {
        return{
            s_value: '',
        }
    },
    methods:{
        onChange(v) {
            this.$emit(v)
        }
    },
    props:{
        value: String,
        disabled: Boolean,
        type: String
    },
    model:{
        prop: 'value',
        event: 'change'
    },
    mounted() {
        if(this.value){
            this.s_value = this.value
            // this.disabled = true
        }
        else{
            this.s_value = '点击';
            // this.onChange(this.s_value)
        }
    }
}
</script>

<style>

</style>